<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" href="/assets/layui_select/formSelects-v4.css">
</head>

<body layadmin-themealias="default">

    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body" pad15="">

                        <div class="layui-form" wid100="" lay-filter="">
                            <input type="hidden" name="id" value="{$guild.id}">
                            <div class="layui-form-item">
                                <label class="layui-form-label">手机号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="mobile" value="{$guild.manager.mobile}" class="layui-input"
                                        lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">登录密码</label>
                                <div class="layui-input-block">
                                    <input type="text" name="password" value="" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">真实姓名</label>
                                <div class="layui-input-block">
                                    <input type="text" name="real_name" value="{$guild.manager.real_name}"
                                        maxlength="32" class="layui-input" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">公会名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="name" value="{$guild.name}" class="layui-input"
                                        lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">公会徽章</label>
                                <div class="layui-input-inline">
                                    <input name="icon" lay-verify="required" id="LAY_iconSrc" placeholder="图片地址"
                                        value="{$guild.icon}" class="layui-input">
                                </div>
                                <div class="layui-input-inline layui-btn-container" style="width: auto;">
                                    <button type="button" class="layui-btn layui-btn-primary" id="LAY_iconUpload">
                                        <i class="layui-icon">&#xe67c;</i>上传图片
                                    </button>
                                    <button class="layui-btn layui-btn-primary" layadmin-event="iconPreview"
                                        id="LAY_iconPreview">查看图片</button>
                                </div>
                            </div>

                            <div class="layui-form-item {$role_id!=1?'layui-hide':''}">
                                <label class="layui-form-label">公会分成比例</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="sharing_ratio" value="{$guild.sharing_ratio}"
                                        class="layui-input" lay-verify="required|number">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">下载量折扣%</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="download_ratio" value="{$guild.download_ratio}"
                                        class="layui-input" lay-verify="required|number">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">扣量保留</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="download_reserved" value="{$guild.download_reserved}"
                                        class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">使用渠道</label>
                                <div class="layui-input-block">
                                    <select name="source_ids" xm-select="source_ids" xm-select-search="">
                                        {volist name="source_list" id="vo"}
                                        <option value="{$vo.id}" {$vo.guild_id>
                                            0?"selected":""}>{$vo.id}-{$vo.source_name}</option>
                                        {/volist}
                                    </select>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">公会说明</label>
                                <div class="layui-input-block">
                                    <textarea placeholder="工会说明" class="layui-textarea"
                                        name="content">{$guild.content}</textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit="" lay-filter="guild-edit">确认保存</button>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="/layuiadmin/layui/layui.js"></script>
    <script src="/assets/cos-js-sdk-v5/cos-js-sdk-v5.min.js"></script>
    <script src="/assets/layui_select/formSelects-v4.min.js"></script>
    <script>
        layui.config({
            base: '/layuiadmin/' //静态资源所在路径
            , version: "{:config('other.ui_version')}"
        }).extend({
            index: 'lib/index',
            formSelects: 'formSelects-v4'
        }).use(['index', 'guild', 'formSelects'], function () {

        })
    </script>
</body>

</html>